package com.pda.yuanjing.pages.login;

import com.pda.yuanjing.beanout.LoginBeanOut;
import com.pda.yuanjing.beanout.LogoBeanOut;
import com.public_module.basemvp.present.BasePresenter;
import java.util.List;

public class LoginPresent extends BasePresenter<LoginModel, LoginView> implements LoginModel.CallBack {

    public void login(String url,String name, String pass, String sn) {
        view.showProgress();
        model.login(url,name, pass,sn,this);
    }

    public void logo(String url) {
        model.logo(url,this);
    }

    @Override
    public void onloginSuccess(List<LoginBeanOut.DataBean.ShowInfoBean> list) {
        if(view!=null){
            view.hideProgress();
            view.loginSucess(list);
        }
    }

    @Override
    public void onFail(String str) {
        if(view!=null){
            view.hideProgress();
            view.showMsg(str);
        }
    }

    @Override
    public void onloginLogo(LogoBeanOut.DataBean dataBean) {
        if(view!=null){
            view.loginLogo(dataBean);
        }
    }
}


